package com.qiantu.phone.ui.shotview;

import com.qiantu.phone.ui.uiutil.LLDeviceUtil;

import java.util.Map;

/**
 * @ClassName DeviceShotActDean
 * @Description TODO
 * @Author ShiJunqiang
 * @Date 2021/12/9 23:28
 * @Version 1.0
 */
public class DeviceShotActBean {
    public String type;
    public String deviceType;
    public String name;
    public String value;
    public String deviceSerialNo;
    public String uiStr;

    public DeviceShotActBean(String type, String deviceType, String name, String value, String deviceSerialNo) {
        this.type = type;
        this.deviceType = deviceType;
        this.name = name;
        this.value = value;
        this.deviceSerialNo = deviceSerialNo;
        uiStr = LLDeviceUtil.getValueStr(type, deviceType, name, value, deviceSerialNo);
    }

    public DeviceShotActBean(String type, String deviceType, String name, String value, String deviceSerialNo,String uiStr) {
        this.type = type;
        this.deviceType = deviceType;
        this.name = name;
        this.value = value;
        this.deviceSerialNo = deviceSerialNo;
        this.uiStr = uiStr;
    }

    public DeviceShotActBean(String type, String deviceType, Map<String,Object> map) {
        this.type = type;
        this.deviceType = deviceType;
        this.name = (String) map.get("actionIdentifier");
        this.value = (String) map.get("rangeIdentifier");
        this.deviceSerialNo = null;
        uiStr = (String) map.get("rangeName");
    }
}
